/*
 * Gsoft开发框架
 * Copyright 2015-2020 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.itcs.app.tran;

import java.util.HashMap;
import java.util.Map;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.stereotype.Component;

import com.alibaba.fastjson.JSON;
import com.itcs.dubbo.service.DubboServiceAdapter;

/**
 * TODO (描述该文件做什么)
 * @author LiuPeng
 * @date 2017年12月9日
 *  
 */
@Component
public class Tran1003 implements DubboServiceAdapter{
	
	private Log logger = LogFactory.getLog(getClass());

	/* (非 Javadoc)  
	 * <p>Title: getTrancode</p>  
	 * <p>Description: </p>  
	 * @return  
	 * @see com.itcs.dubbo.service.DubboServiceAdapter#getTrancode()  
	 */  
	@Override
	public String getTrancode() {
		return "1003";
	}

	/* (非 Javadoc)  
	 * <p>Title: exchange</p>  
	 * <p>Description: </p>  
	 * @param reqRecord
	 * @return  
	 * @see com.itcs.dubbo.service.DubboServiceAdapter#exchange(java.util.Map)  
	 */  
	@Override
	public Map<String, Object> exchange(Map<String, Object> reqRecord) {
		logger.info("收到dubbo请求:"+JSON.toJSONString(reqRecord));
		Map<String, Object> res = new HashMap<>();
		res.put("rescode", "000000");
		res.put("resmsg", "收到你的1003请求,处理完成了");
		return res;
	}

}
